import VueRouter from './router.js'
import Vue from 'vue'
import componentA from '../components/component-A'

Vue.use(VueRouter)

export default new VueRouter({
  routes: [
    {
      path: '/',
      redirect: '/component-A'
    },
    {
      path: '/component-A/:id',
      component: componentA,
      children: [
        {
          path: '/children-A/:id',
          component: () => import('../components/children-A.vue')
        },
        {
          path: '/children-B/:id',
          component: () => import('../components/children-B.vue')
        }
      ]
    },
    {
      path: '/component-B',
      component: () => import('../components/component-B')
    }
  ]
})

